package com.yh.dao;

import com.yh.javabean.Role;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RoleDao {
    @Insert ("insert into users_role (userId,roleId) values(#{userId},#{roleId})")
    int insertUR(@Param ("userId") int userId, @Param("roleId")  int roleId);
    Role selectByUid(int uid);
    @Select("select * form role where di=#{id}")
    Role selectByRid(int id);
    @Select("select * form role")
    List<Role> selectAll();
}
